<?
        require_once('../inc/facebook.php');
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Home Page</title>
    <link rel="stylesheet" type="text/css" href="../inc/jquery-ui.css">
    <link rel="stylesheet" type="text/css" href="../inc/bootstrap.css">
    <style type="text/css" >
        li {
                margin: 5px;
                        height: 55px;
        }
                li img{
                        float: left;
                }
        </style>
</head>

<body>
        <? include('../inc/header.php'); ?>
        <div class="container">
                        <? include('../inc/nav.php'); ?>
            <div id="contents">
               
           
            </div>
       </div>
       
    <script id="list_template" type="text/x-handlebars-template" src="../inc/handlebars.js">
        <h3>Searched for {{query}}</h3>
                <ul class="unstyled">
                        {{#each results}}
                                {{> t_item}}
                        {{/each}}              
                </ul>
        </script>
        <script id="item_template" type="text/x-handlebars-template" src="../inc/handlebars.js">
          <li id="list_item_{{id}}">
                <img src="{{profile_image_url}}" />
                {{from_user_name}}
                (@{{from_user}})
            {{text}}
                {{{source}}}
          </li>
        </script>
        <script type="text/javascript" src="../inc/handlebars.js">
        </script>
        <script type="text/javascript">
                $(function(){
                        var userUrl = "http://twitter.com/status/user_timeline/";       // append "USERNAME.json?callback=?" to end
                        var searchUrl = "http://search.twitter.com/search.json"
                        var t_list = Handlebars.compile($("#list_template").html());
                        var t_item = Handlebars.compile($("#item_template").html());
                        Handlebars.registerPartial('t_item', t_item);

                        $.getJSON(searchUrl + "?callback=?", {q : "#NewPaltz"}, function(data){
                                                $("#contents").append(t_list(data));
                        });
                       
                })
        </script>
       
</body>
</html>
